package guopai.android.outfieldcheck;


import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TabHost;
import android.widget.TextView;

public class OutfieldCheckActivity extends TabActivity implements TabHost.TabContentFactory {
    /** Called when the activity is first created. */

	@Override
	protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        final TabHost tabHost = getTabHost();
        Intent intent1 = new Intent();
        intent1.setClass(this, AutoListActivity.class);
        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("车辆列表", getResources().getDrawable(android.R.drawable.star_big_on))
                .setContent(intent1));
        Intent intent2 = new Intent();
        intent2.setClass(this, TestActivity.class);
        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("车辆检测", getResources().getDrawable(android.R.drawable.star_big_on))
                .setContent(intent2));
        Intent intent = new Intent();
        intent.setClass(this, TestActivity.class);
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("数据同步", getResources().getDrawable(android.R.drawable.ic_input_add))
                .setContent(intent));
        
        Intent intent4 = new Intent();
        intent4.setClass(this, TestActivity.class);
        tabHost.addTab(tabHost.newTabSpec("帮助")
                .setIndicator("", getResources().getDrawable(android.R.drawable.ic_menu_help))
                .setContent(intent4));
    }

    /** {@inheritDoc} */
    @Override
	public View createTabContent(String tag) {
        final TextView tv = new TextView(this);
        tv.setText("Content for tab with tag " + tag);
        return tv;
    }

}